﻿Public Class Form2
    Dim full, drive As String
    Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.TopMost = True
        full = Reflection.Assembly.GetExecutingAssembly.Location
        drive = IO.Path.GetPathRoot(full)
        Try
            ListBox1.Items.Clear()
            Dim index1 = System.IO.File.ReadAllLines("" & drive & "Cyberweb.log").Length
            Dim lines() As String = IO.File.ReadAllLines("" & drive & "Cyberweb.log")
            Dim ik = index1
            Dim i
            For i = 1 To ik

                index1 = ik - i
                ListBox1.Items.Add(lines(index1))


            Next i
        Catch
        End Try
    End Sub

    Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged


        Internet.navi(ListBox1.Text)
      
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Try
            ListBox1.Items.Clear()
            Dim index1 = System.IO.File.ReadAllLines("" & drive & "Cyberweb.log").Length
            Dim lines() As String = IO.File.ReadAllLines("" & drive & "Cyberweb.log")
            Dim ik = index1
            Dim i
            For i = 1 To ik

                index1 = ik - i
                ListBox1.Items.Add(lines(index1))


            Next i
        Catch
        End Try
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        ListBox1.Items.Clear()
        If Dir("" & drive & "Cyberweb.log") = "" Then

        Else
            Kill("" & drive & "Cyberweb.log")
        End If

    End Sub
End Class